home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus Special 16 / AMIGAplus Sonderheft 16 (1998)(ICP)(DE)[!].iso / pd / anwendungen / ispell-3.1.18bin / interfaces / guispell-1.1 / libraries.c < prev    next >
C/C++ Source or Header  |  1995-09-21  |  683b  |  34 lines

  1. #pragma msg 148 ignore push
  2. #pragma msg 149 ignore push
  3. #pragma msg 61 ignore push
  4. #include <proto/exec.h>
  5. #pragma msg 149 pop
  6. #pragma msg 61 pop
  7. #define INCLUDE_LIBS_STRUCT
  8. #include "libraries.h"
  9. #include "error.h"
  10.  
  11. extern char *_ProgramName;
  12.  
  13. void OpenLibraries (void)
  14. {
  15.   int i;
  16.  
  17.   for (i = 0; libs[i].name; i++)
  18.     if (!(libs[i].base = OpenLibrary (libs[i].name, libs[i].version)))
  19.       Error ("ssssds", _ProgramName, ": Can't open needed library (",
  20.          libs[i].name, " version ", libs[i].version, ")!\n");
  21. }
  22.  
  23. void CloseLibraries (void)
  24. {
  25.   int i;
  26.  
  27.   for (i = 0; libs[i].name; i++)
  28.     {
  29.       if (libs[i].base)
  30.     CloseLibrary (libs[i].base);
  31.       libs[i].base = 0;
  32.     }
  33. }
  34.